<template>
	<view class="list">
		<view class="list-item" v-for="(item, index) in list" :key="index" @click="router(item)">
			<view class="title">{{ item.title }}</view>
			<view class="time">{{ utils.timeTrans(item.stime) }}</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'myListTime',
	props: {
		list: {
			type: Array,
			default: () => {
				return [
					{
						id: '47',
						title: '【雅正之星】第一届最美讲解员大赛',
						stime: '1590479372'
					},
					{
						id: '40',
						title: '题库界面更新/功能升级通知',
						stime: '1585635691'
					}
				];
			}
		}
	},
	methods:{
		router(item) {
			this.$router.push({
				route:this.$routesConfig.noticeDetail,
				query:{
					id:item.id,
					title:item.title
				}
			})
		}
	}
};
</script>

<style lang="less" scoped>
	.list{
		width:100%;
		background-color: #fff;
		padding:0 20rpx;
		box-sizing: border-box;
		.list-item{
			display:flex;
			justify-content: space-between;
			align-items: center;
			border-bottom: 2rpx dashed #f5f5f5;
			height:88rpx;
			.title{
				font-size:28rpx;
				flex: 1;
				white-space: nowrap;
				text-overflow: ellipsis;
				overflow: hidden;
			}
			.time{
				font-size:24rpx;
				width: 134rpx;
			}
		}
	}
</style>
